import matplotlib.pyplot as plt
from randomwalk import randomwalk_entity
while True:
    rw=randomwalk_entity()
    rw.fill_walk()
    plt.figure(figsize=(15,8))
    point_numbers=list(range(rw.num_points))

    plt.scatter(rw.x_values,rw.y_values,s=10,c=point_numbers,
    edgecolor='none',cmap=plt.cm.Blues)

    plt.scatter(rw.x_values[0],rw.y_values[0],s=50,edgecolor='none',
    c='green')

    plt.scatter(rw.x_values[-1],rw.y_values[-1],s=50,edgecolor='none',
    c='green')

    plt.show()

    a=input("do you want to walk again?(y/n)")
    if a=='n':
        break